FROM golang:1.24.5 AS builder
WORKDIR /app
COPY . .
RUN go mod tidy
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o goapp .

FROM golang:1.24.5
WORKDIR /app
COPY --from=builder /app/goapp .
EXPOSE 3000
CMD ["./goapp"]
